/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gui;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JScrollPane;
import javax.swing.JTable;

import com.metier.UsersMetier;

/**
 *
 * @author Mamadou
 */
public class FenConsultant extends javax.swing.JPanel {

    /**
     * Creates new form FenConsultant
     */
    public FenConsultant() {
    	usersMetier=new UsersMetier();
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelHaut = new javax.swing.JPanel();
        labelphotohaut = new javax.swing.JLabel();
        panelBas = new javax.swing.JPanel();
        boutonAjouterConsultant = new javax.swing.JButton();
        boutonLister = new javax.swing.JButton();
        labelphotobas = new javax.swing.JLabel();
      

        setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(102, 153, 255)));
        setDoubleBuffered(true);
        setEnabled(true);
        setFocusable(true);
       setMaximumSize(new java.awt.Dimension(1050, 550));
       setMinimumSize(new java.awt.Dimension(1050, 550));
       setPreferredSize(new java.awt.Dimension(1050, 550));
        setOpaque(true);
        setRequestFocusEnabled(true);
        setVerifyInputWhenFocusTarget(true);
        setLayout(new java.awt.BorderLayout());

        labelphotohaut.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/photos/PhotoUsers1.jpg"))); // NOI18N

        javax.swing.GroupLayout panelHautLayout = new javax.swing.GroupLayout(panelHaut);
        panelHaut.setLayout(panelHautLayout);
        panelHautLayout.setHorizontalGroup(
            panelHautLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(labelphotohaut, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelHautLayout.setVerticalGroup(
            panelHautLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(labelphotohaut, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        add(panelHaut, java.awt.BorderLayout.PAGE_START);

        panelBas.setBackground(new java.awt.Color(223, 242, 255));
        panelBas.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(102, 153, 255)));

        boutonAjouterConsultant.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/photos/add16.png"))); // NOI18N
        boutonAjouterConsultant.setToolTipText("Ajouter");
        boutonAjouterConsultant.addActionListener(new ActionListener() {
			
			
			public void actionPerformed(ActionEvent e) {
				
				panelBas.removeAll();
				PanelAjoutConsultant panelAjouterConsultant=new PanelAjoutConsultant();
				add(panelAjouterConsultant,BorderLayout.CENTER);
				validate();
				
				
			}
		});
        boutonLister.addActionListener(new ActionListener() {
			
		
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				panelBas.removeAll();
				PanelListerConsultant panelListerConsultant=new PanelListerConsultant();
				//JTable tableListeUsers=usersMetier.tableauListUsers();
				//panelListerConsultant.add(new JScrollPane(tableListeUsers), BorderLayout.CENTER);
				
				add(panelListerConsultant,BorderLayout.CENTER);
				validate();
			
				
			   
				
			}
		});
        

        boutonLister.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/photos/bontonliste.jpg"))); // NOI18N
        boutonLister.setToolTipText("Liste");

        labelphotobas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/photos/photosBasConsultants.jpg"))); // NOI18N
        labelphotobas.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(102, 153, 255)));

        javax.swing.GroupLayout panelBasLayout = new javax.swing.GroupLayout(panelBas);
        panelBas.setLayout(panelBasLayout);
        panelBasLayout.setHorizontalGroup(
            panelBasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelBasLayout.createSequentialGroup()
                .addGap(309, 309, 309)
                .addComponent(boutonAjouterConsultant, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35)
                .addComponent(boutonLister, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(labelphotobas, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelBasLayout.setVerticalGroup(
            panelBasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelBasLayout.createSequentialGroup()
                .addGroup(panelBasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(boutonAjouterConsultant, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(boutonLister, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelphotobas, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        add(panelBas, java.awt.BorderLayout.CENTER);
        
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton boutonAjouterConsultant;
    private javax.swing.JButton boutonLister;
    private javax.swing.JLabel labelphotobas;
    UsersMetier usersMetier;
    public javax.swing.JPanel getPanelBas() {
		return panelBas;
	}

	public void setPanelBas(javax.swing.JPanel panelBas) {
		this.panelBas = panelBas;
	}
	private javax.swing.JLabel labelphotohaut;
    private javax.swing.JPanel panelBas;
    public javax.swing.JPanel getPanelHaut() {
		return panelHaut;
	}

	public void setPanelHaut(javax.swing.JPanel panelHaut) {
		this.panelHaut = panelHaut;
	}
	private javax.swing.JPanel panelHaut;
    // End of variables declaration//GEN-END:variables
}
